package com.automannn.seataSamples.order.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;

/**
 * @author automannn
 * @Date 2022/3/24
 */
@Data
@TableName("t_order")
public class OrderPO extends Model<OrderPO> {

    private static final long serialVersionUID = 1L;

    /**
     * 订单唯一编号
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /**
     * 订单编号
     */
    private String orderNo;

    /**
     * 订单所属人员
     */
    private String userId;

    /**
     * 订单所属商品编码
     */
    private String commodityCode;

    /**
     * 订单中包含的商品数量
     */
    private Integer count;

    /**
     * 订单金额
     */
    private Double amount;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
